import { useCookies } from '@vueuse/integrations/useCookies'
const TokenKey = "admin-token"
const UserName = "username"
const cookie = useCookies()

// 获取token
export function getToken(){
    return cookie.get(TokenKey)
}

// 设置token
export function setToken(token){
    return cookie.set(TokenKey, token)
}

// 清除token
export function removeToken(){
    return cookie.remove(TokenKey)
}

// 获取UserName
export function getUserName(){
    return cookie.get(UserName)
}

// 设置UserName
export function setUserName(username){
    return cookie.set(UserName, username)
}

// 清除UserName
export function removeUserName(){
    return cookie.remove(UserName)
}
